package com.leyou.lyelasticsearch.client;

import com.leyou.common.entity.MyPage;
import com.leyou.item.entity.TbSpuBo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "ly-item-service",contextId = "goodsFeign")
//@RequestMapping("goods")
public interface GoodsFeignClient {

    @GetMapping("names")
    List<String> queryCategoryNamesByIds(@RequestParam("ids") List<Long> ids);
    //查询spu信息
    @GetMapping("/spu/page")
    MyPage<TbSpuBo> querySpuByKey(
            @RequestParam(value = "key",required = false) String key,
            @RequestParam(defaultValue = "1") int page,
            @RequestParam(defaultValue = "5") int rows,
            @RequestParam(value = "saleable",required = false) Boolean saleable
    );

}
